#!/usr/bin/env Rscript

packages <- c("dplyr", "data.table", "readxl", "tidyr", "ggplot2", "extrafont", "showtext", "stringr", "modelsummary", "sandwich", "lmtest", "fwildclusterboot", "fixest", "kableExtra", "countrycode", "marginaleffects", "flextable", "ggrepel", "ggthemes", "purrr", "rmarkdown")

install.packages(packages, dependencies = TRUE)

setwd("/home/patrick/Dropbox/Diaspora_Narratives/Submission/SecStud/Replication")

## Execute all scripts
source("01_code/country_analysis.R")
source("01_code/diaspora_analysis.R")
source("01_code/misc_figures.R")
source("01_code/misc_tables.R")
